﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Xml.Serialization;

namespace PlanningGIS.ManageUtility
{
    /// <summary>
    /// 安全设置
    /// </summary>
    [DataContract]
    public class SecuritySet
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public SecuritySet()
        {
            AllowFZD = true;
            SplitUser = true;
        }

        /// <summary>
        /// 允许出错的次数
        /// </summary>
        [DisplayName("允许出错的次数")]
        [Category("安全设置")]
        [DataMember]
        public int ErrorNumber { get; set; }        

        /// <summary>
        /// 密码有效期
        /// </summary>
        [DisplayName("密码有效期（月）")]
        [Category("安全设置")]
        [DataMember]
        public int PasswordValid { get; set; }

        /// <summary>
        /// 重鉴别时间
        /// </summary>
        [DisplayName("重鉴别时间（分）"), Description("设置系统空闲重鉴别时间")]
        [Category("安全设置")]
        [DataMember]
        public double  IdentifyTime { get; set; }

        /// <summary>
        /// 锁定时间
        /// </summary>
        [DisplayName("锁定时间（分）"), Description("设置密码锁定后自动解锁的时间")]
        [Category("安全设置")]
        [DataMember]
        public double LockTime { get; set; }

        /// <summary>
        /// 三员分立
        /// </summary>
        [DisplayName("三员分立"), Description("是否启用三员分立功能，true启用")]
        [Category("安全设置")]
        [Browsable(false)]
        [DataMember]
        public bool SplitUser { get; set; }

        /// <summary>
        /// 范围权限
        /// </summary>
        [DisplayName("范围权限"), Description("是否启用范围权限，true启用")]
        [Category("安全设置")]
        [DataMember]
        public bool StartRegion { get; set; }

        /// <summary>
        /// 保密标识
        /// </summary>
        [DisplayName("保密标识"), Description("是否显示保密标识，true显示"), DefaultValue(false)]
        [Category("安全设置")]
        [DataMember]
        public bool ShowSecurity { get; set; }

        /// <summary>
        /// 是否启用密码复杂度
        /// </summary>
        [DisplayName("是否启用密码复杂度")]
        [Category("安全设置")]
        [Browsable(false)]
        [DataMember]
        public bool AllowFZD { get; set; }

    }
}
